Ethernet is a family of computer network standards that are widely used in wired local area networks (LANs). These standards have been codified by the IEEE 802.3 working group and define a wide range of link-layer protocol features and medium access control (MAC) functions. The Ethernet link-layer protocol may run over a variety of underlying physical-layer (PHY) types and protocols.
In packet-switched networks, such as Ethernet, switches have buffers that facilitate lossless operation. When the rate of incoming packet rates from a source is higher than the switch can accommodate, however, data can accumulate in the buffer, and packets may be dropped due to exceeding the buffer size. To ameliorate this problem, Ethernet switches send link-level flow-control messages when the buffer fill level of a particular queue or ingress port and priority exceeds a specified threshold, called the XOFF threshold. The flow-control message is sent to the source of the packets to instruct the source to stop transmitting packets.
For this purpose, Annex 31B of the IEEE 802.3 specification defines an optional flow control operation using “PAUSE” frames. When the receiver on a given link transmits a PAUSE frame to the transmitter, it causes the transmitter to temporarily stop all transmission on the link (except certain control frames) for a period of time that is specified in the PAUSE frame. This pause command mechanism enables the receiver to recover from states of buffer overfill.
Recently, a number of new IEEE standards for data center bridging (DCB) have been proposed, offering enhanced Ethernet flow control capabilities. For example, the IEEE 802.1Qbb project authorization request (PAR) provides priority-based flow control (PFC) as an enhancement to the pause mechanism described above. PFC creates eight separate virtual links on a given physical link and allows the receiver to issue commands that pause and restart the virtual links independently. PFC thus enables the operator to implement differentiated quality of service (QoS) policies for the eight virtual links.
Due to delays in receiving and acting on flow-control messages at the transmitter, the receiving switch will continue receiving frames from the source for a certain amount of time even after transmitting the XOFF (PAUSE) message. In view of this delay, a portion of the switch buffer is normally reserved to admit the packets that may arrive after the flow-control message is sent. This reserved buffer is referred to as the lossless headroom, or, simply, headroom.
It is possible for multiple ports to share headroom space in the switch buffer. For example, U.S. Patent Application Publication 2013/0250757 describes mechanisms to reduce headroom size while minimizing dropped packets by using a shared headroom space between all ports, and providing a randomized delay in transmitting a flow-control message.
As another example, example, U.S. Patent Application Publication 2013/0250762 describes a method for achieving lossless behavior for multiple ports sharing a buffer pool. Packets are “colored” and stored in a shared packet buffer without assigning fixed page allocations per port. The packet buffer is divided into three areas: an unrestricted area, an enforced area, and a headroom area. Regardless of the fullness level, when a packet is received it will be stored in the packet buffer. If the fullness level is in the unrestricted area, no flow-control messages are generated. If the fullness level is in the enforced region, a probabilistic flow-control generation process is used to determine whether a flow-control messages will be generated. If the fullness level is in the headroom area, flow-control is automatically generated.